const {build} = require('esbuild')
const path = require('path')
const target = 'reactivity'

build({
    entryPoints: [path.resolve(__dirname, `../packages/${target}/src/index.ts`)],
    outfile: path.resolve(__dirname, `../packages/${target}/dist/${target}.js`),
    bundle: true,
    sourcemap: true,
    format: "esm",
    platform: "browser",
    watch: {
        onRebuild() {
            console.log("rebuild")
        }
    }
}).then(() => {
    console.log('watching~~~')
})